package com.tedu.crmpx.notice.controller;

import com.tedu.crmpx.base.response.JsonResult;
import com.tedu.crmpx.notice.pojo.dto.NoticeQuery;
import com.tedu.crmpx.notice.pojo.dto.NoticeSaveParam;
import com.tedu.crmpx.notice.pojo.vo.NoticeVO;
import com.tedu.crmpx.notice.service.NoticeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api/notice/")
@Slf4j
public class NoticeController {
    @Autowired
    NoticeService noticeService;
    @RequestMapping("select")
    public JsonResult save(NoticeQuery noticeQuery){
        log.debug("查询公告列表:{}",noticeQuery);
        List<NoticeVO> list = noticeService.loadNotice(noticeQuery);
        return JsonResult.ok(list);
    }
}
